var Mock = require('mockjs');

exports.response = function (req, res) {
    return Mock.mock({
        "code": 0,
        "msg": "OK",
        "data": {
            "fieldList": [
                {
                    "id": "stockCode",
                    "name": "股票代码"
                },
                {
                    "id": "stockAbbreviation",
                    "name": "股票简称"
                },
                {
                    "id": "occupationRatio",
                    "name": "占比"
                },
                {
                    "id": "marketValue",
                    "name": "A股市值/亿"
                },
                {
                    "id": "industry1",
                    "name": "申万I级"
                },
                {
                    "id": "industry2",
                    "name": "申万II级"
                },
                {
                    "id": "week",
                    "name": "过往1周"
                },
                {
                    "id": "month",
                    "name": "过往1个月"
                },
                {
                    "id": "quarter",
                    "name": "过往3个月"
                },
                {
                    "id": "year",
                    "name": "过往1年"
                },
                {
                    "id": "peTtm",
                    "name": "P/E TTM"
                },
                {
                    "id": "peYear",
                    "name": "PE未来12个月"
                },
                {
                    "id": "historyPeg",
                    "name": "历史PEG"
                },
                {
                    "id": "profitForecast",
                    "name": "每股收益预测"
                },
                {
                    "id": "isIn300",
                    "name": "是否属于CSI300"
                },
            ],
            "list|4": [
                {
                    "id|+1":"@float(1, 100, 0,0)",
                    "stockCode": "@integer(0,500000)-CN",
                    "stockAbbreviation": "红日药业",
                    "occupationRatio": "@float(0, 1, 4,4)",
                    "marketValue": "@integer(0,1000)",
                    "industry1": "医药生物",
                    "industry2": "中药Ⅱ",
                    "week": "@float(-100, 100, 2,2)",
                    "month": "@float(-100, 100, 2,2)",
                    "quarter": "@float(-100, 100, 2,2)",
                    "year": "@float(-100, 100, 2,2)",
                    "peTtm":"@float(0, 100, 2,2)",
                    "peYear": "@float(0, 100, 2,2)",
                    "historyPeg": "@float(0, 100, 2,2)",
                    "profitForecast": "@float(0, 100, 2,2)",
                    "isIn300": "@boolean()"
                }
            ],
            total:0.235689,
            date:'2018-03-12'
        }
    })
}